package com.hop.design.factory;

import com.hop.design.factory.impl.Sender;
import com.hop.design.factory.impl.MailSender;
import com.hop.design.factory.impl.SmsSender;

/**
 * 普通工厂模式
 * @author Administrator
 *
 */
public class NormalSendFactory {
	
	public Sender produce(String type){
		if("mail".equals(type)){
			return new MailSender();
		}else if("sms".equals(type)){
			return new SmsSender();
		}else{
			System.out.println("请输入正确的类型");
			return null;
		}
	}
}
